<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/commonPage.jsp"%>
<!DOCTYPE HTML>
<html>
	<head>
		<title>分类更新 - 商城后台</title>
		<%@ include file="/common/include/title.jsp"%>
		<script language="javascript" type="text/javascript" src="${rootpath }/common/resource/My97DatePicker/WdatePicker.js"></script>
		
		<script type="text/javascript" charset="utf-8" src="${rootpath }/ueditor/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="${rootpath }/ueditor/ueditor.all.min.js"> </script>
	    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
	    <!--这里加载的语言文件会覆盖你在配置项目里更新的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
	    <script type="text/javascript" charset="utf-8" src="${rootpath }/ueditor/lang/zh-cn/zh-cn.js"></script>
	</head>
	<body>
		<div class="pd-20">
			<form action="${rootpath }/back/goods/cateUpdateSubmit.html" method="post" class="form form-horizontal"
				enctype="multipart/form-data"
				id="form-article-add">
				<input type="hidden" name="cid" value="${requestScope.cate.id }">
				
				<div class="row cl">
					<div class="col-10 col-offset-2">
						<button class="btn btn-primary radius" type="submit">
							<i class="Hui-iconfont">&#xe632;</i> 保存
						</button>
						${info}
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2"><span class="c-red">*</span>名称：</label>
					<div class="formControls col-10">
						<input type="text" class="input-text" value="${requestScope.cate.name }" placeholder="" id=""
							name="name">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2">url：</label>
					<div class="formControls col-10">
						<input type="text" class="input-text" value="${requestScope.cate.url}" placeholder="" id=""
							name="url">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2"><span class="c-red">*</span>发布时间：</label>
					<div class="formControls col-2">
						<input name="pubTimeStr" class="input-text" value="<fmt:formatDate value="${requestScope.cate.pubTime }" pattern="yyyy-MM-dd HH:mm:ss"/>" style="width:150px;" type="text" placeholder="发布时间" 
						onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2">规格：</label>
					<div class="formControls col-10">
						<textarea rows="5" cols="70" name="spec">${requestScope.cate.spec }</textarea>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2"><span class="c-red">*</span>状态：</label>
					<div class="formControls col-2">
						<input type="radio" name="status" id="status1" value="1" ${requestScope.cate.status == '1' ? 'checked' : '' }><label for="status1">启用</label>
						<input type="radio" name="status" id="status0" value="0" ${requestScope.cate.status == '0' ? 'checked' : '' }><label for="status0">禁用</label>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-2">内容：</label>
					<div class="formControls col-10">
						<!-- 百度编辑器的内容 -->
						<script id="editor" type="text/plain" name="content" style="width:800px;height:500px;">${requestScope.cate.content}</script>
					</div>
				</div>
			</form>
		</div>
		</div>
	</body>
</html>
<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
/* editor是id为editor百度编辑器存储的位置 */
var ue = UE.getEditor('editor');
</script>